package day02;

/**
 * 浮点型: float   double 默认是double
 */
public class Demo02 {
    public static void main(String[] args) {
        float f1 = 3.14f;//float需要在整数或小数后加F或f来表示
        System.out.println("f1="+f1);
        f1 = 5f;
        System.out.println("f1="+f1);
        double d = 3.1415;
        System.out.println("d="+d);
        d = 12;
        System.out.println("d="+d);

        System.out.println(0.05+0.01);
        System.out.println(1.0-0.42);
        System.out.println(4.015*100);
        System.out.println(123.3/100);

    }
}
